package com.wmh.baseservice.user.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-10-16
 */
@ApiModel(value="UsRentOrder对象", description="用户租赁订单表")
public class UsRentOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "0待付款 1已付款 -1已取消")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "区域id")
    private Long regionId;

    @ApiModelProperty(value = "支付金额")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "用户id")
    private Long usId;

    @ApiModelProperty(value = "订单编号")
    private String orderNum;

    @ApiModelProperty(value = "套餐id")
    private Long rentMenuId;

    @ApiModelProperty(value = "快照")
    private String snapshot;

    @ApiModelProperty(value = "租赁合同id")
    private Long rentId;

    @ApiModelProperty(value = "1正常租 2续租")
    private Integer type;

    @TableField(exist = false)
    private String plotName;

    @TableField(exist = false)
    private String regionName;

    @TableField(exist = false)
    private String lat;

    @TableField(exist = false)
    private String lng;

    @TableField(exist = false)
    private Double lon;


    public Double getLon() {
        return lon;
    }

    public void setLon(Double lon) {
        this.lon = lon;
    }

    public Double getWide() {
        return wide;
    }

    public void setWide(Double wide) {
        this.wide = wide;
    }

    @TableField(exist = false)
    private Double wide;




    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public String getPlotName() {
        return plotName;
    }

    public void setPlotName(String plotName) {
        this.plotName = plotName;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }
    public Long getId() {
        return id;
    }

    public UsRentOrder setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public UsRentOrder setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public UsRentOrder setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public UsRentOrder setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsRentOrder setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsRentOrder setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getRegionId() {
        return regionId;
    }

    public UsRentOrder setRegionId(Long regionId) {
        this.regionId = regionId;
        return this;
    }
    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public UsRentOrder setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public UsRentOrder setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public String getOrderNum() {
        return orderNum;
    }

    public UsRentOrder setOrderNum(String orderNum) {
        this.orderNum = orderNum;
        return this;
    }
    public Long getRentMenuId() {
        return rentMenuId;
    }

    public UsRentOrder setRentMenuId(Long rentMenuId) {
        this.rentMenuId = rentMenuId;
        return this;
    }
    public String getSnapshot() {
        return snapshot;
    }

    public UsRentOrder setSnapshot(String snapshot) {
        this.snapshot = snapshot;
        return this;
    }
    public Long getRentId() {
        return rentId;
    }

    public UsRentOrder setRentId(Long rentId) {
        this.rentId = rentId;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public UsRentOrder setType(Integer type) {
        this.type = type;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String REGION_ID = "region_id";

    public static final String PAY_AMOUNT = "pay_amount";

    public static final String US_ID = "us_id";

    public static final String ORDER_NUM = "order_num";

    public static final String RENT_MENU_ID = "rent_menu_id";

    public static final String SNAPSHOT = "snapshot";

    public static final String RENT_ID = "rent_id";

    public static final String TYPE = "type";

    @Override
    public String toString() {
        return "UsRentOrder{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", regionId=" + regionId +
            ", payAmount=" + payAmount +
            ", usId=" + usId +
            ", orderNum=" + orderNum +
            ", rentMenuId=" + rentMenuId +
            ", snapshot=" + snapshot +
            ", rentId=" + rentId +
            ", type=" + type +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsRentOrder.ID
            ,UsRentOrder.STATUS
            ,UsRentOrder.REMARK
            ,UsRentOrder.VERSION
            ,UsRentOrder.CREATE_TIME
            ,UsRentOrder.UPDATE_TIME
            ,UsRentOrder.REGION_ID
            ,UsRentOrder.PAY_AMOUNT
            ,UsRentOrder.US_ID
            ,UsRentOrder.ORDER_NUM
            ,UsRentOrder.RENT_MENU_ID
            ,UsRentOrder.SNAPSHOT
            ,UsRentOrder.RENT_ID
            ,UsRentOrder.TYPE
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}